import Http from "../http";

export const queryRules = function(data: any) {
    return Http.post('/api/rule/list', data)
}

export const countRules = function(data: any) {
    return Http.post('/api/rule/list/count', data)
}

export const deleteRuleApi = function(params: any) {
    return Http.get('/api/rule/delete', params)
}

export const addRuleApi = function(data: any) {
    return Http.post('/api/rule/add', data)
}

export const modifyRuleApi = function(data: any) {
    return Http.post('/api/rule/update', data)
}

export const queryRuleDetailApi = function(params: any) {
    return Http.get('/api/rule/detail', params)
}

export const queryTreeRulesApi = function() {
    return Http.get('/api/rule/list_detail')
}

export const queryRuleClassApi = function() {
    return Http.get('/api/rule/get_class')
}

export const setDefaultRuleApi = function(data: any) {
    return Http.post('/api/rule/set_default', data)
}

export const clearDefaultRuleApi = function(data: any) {
    return Http.post('/api/rule/clean_default', data)
}

